import Vue from 'vue'
import App from './App.vue'
import router from './router'
import moment from 'moment'
import './plugins/element.js'

import './assets/css/global.css'
import './assets/fonts/iconfont.css'
import axios from 'axios'
axios.defaults.baseURL='http://127.0.0.1:8888/api/private/v1/'

axios.interceptors.request.use(config => {
  config.headers.Authorization = sessionStorage.getItem('token')
  return config
})
//全局注册第三方表格组件
import ZKTable from 'vue-table-with-tree-grid'
Vue.component('tree-table',ZKTable)

Vue.config.productionTip = false

Vue.prototype.$http=axios


Vue.prototype.moment=moment
//过滤器
Vue.filter('dateTIMEFormat',function(dateStr,pattern='YYYY-MM-DD HH:mm:ss'){
    return moment(dateStr).format(pattern);
})



import echarts from 'echarts'
Vue.prototype.$echarts = echarts

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
